import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/smart-govsvc/cityworkAssess/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/smart-govsvc/cityworkAssess/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/smart-govsvc/cityworkAssess/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/smart-govsvc/cityworkAssess/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/smart-govsvc/cityworkAssess/submit',
    method: 'post',
    data: row
  })
}

export const checkSave = (inspectionDate) => {
  return request({
    url: '/api/smart-govsvc/cityworkAssess/checkSave',
    method: 'post',
    params: {
      inspectionDate
    }
  })
}


export const getListByDeptAndMonth = (assessId) => {
  return request({
    url: '/api/smart-govsvc/cityworkAssess/getListByDeptAndMonth',
    method: 'get',
    params: {
      assessId
    }
  })
}

export const examineSave = (id,total,details) =>{
  return request({
    url: '/api/smart-govsvc/cityworkAssess/examineSave',
    method: 'post',
    params: {
      id,
      total,
      details
    }
  })
}



export const getListDetailMonth = (assessId) => {
  return request({
    url: '/api/smart-govsvc/cityworkAssess/getListDetailMonth',
    method: 'get',
    params: {
      assessId
    }
  })
}




export const getKpiChekDetail = (id,kpiType) => {
  return request({
    url: '/api/smart-govsvc/cityworkAssess/getKpiChekDetail',
    method: 'get',
    params: {
      id,
      kpiType
    }
  })
}